package com.macro.mall.portal.controller;


import com.macro.mall.common.api.CommonResult;
import com.macro.mall.portal.domain.Taxation;
import com.macro.mall.portal.domain.Transfer;
import com.macro.mall.portal.service.ITaxationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/taxation")
@Api(tags = "TaxationController", description = "税费计算器")
public class TaxationController {

    @Autowired
    private ITaxationService iTaxationService;

    @ApiOperation("添加查税费记录")
    @RequestMapping(value = "/addOne", method = RequestMethod.POST)
    public CommonResult addOne(@RequestBody Taxation taxation) {
        try {
            iTaxationService.addOne(taxation);
        } catch (Exception e) {
            e.printStackTrace();
            return CommonResult.failed("服务器异常");
        }
        return CommonResult.success(null, "添加成功");
    }
}
